package com.thyme.rocketmq;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;

/**
 * @author thyme
 * @ClassName MessageConsumer
 * @Description TODO
 * @Date 2019/12/3 21:28
 */
@Slf4j
@Service
@RocketMQMessageListener(topic = MessageProducer.TOPIC,consumerGroup = "consumer-group")
public class MessageConsumer implements RocketMQListener<String> {

    @Override
    public void onMessage(String s) {
        log.info("接收到的信息为："+ s);
    }
}
